package com.tyk.bookstore.back.platform.model.vo;


import com.tyk.bookstore.back.common.core.util.FileUtil;
import com.tyk.bookstore.back.platform.model.enume.CarouselState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author tyk
 * @description 轮播图管理
 */
@Data
public class CarouselVo implements Serializable {

    @Schema(description = "ID")
    private Long id;

    @Schema(description = "路径")
    private String path;

    @Schema(description = "关联链接")
    private String link;

    @Schema(description = "优先级")
    private Integer priority;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "状态")
    private CarouselState state;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    public CarouselVo setPath(String path) {
        this.path = FileUtil.fullFilePath(path);
        return this;
    }
}
